package com.echo.neocommunity.utils;


public class RedisKeyUtils {

    private static final String SPLIT=":";
    private static final String PREFIX="like:entity";
    private static final String Followee="Followee";
    private static final String Follower="Follower";
    private static final String KAPTCHA="kaptcha";
    private static final String TICKET="ticket";
    private static final String USER="user";

    public static String getEntityLikeKey(int entityType,int entityId){
        return PREFIX+SPLIT+entityType+SPLIT+entityId;
    }

    public static String getUserLikeKey(int userId){
        return PREFIX+SPLIT+userId;
    }

    public static String getFolloweeKey(int userId,int entityType){
        return Followee+SPLIT+userId+SPLIT+entityType;
    }

    public static String getFollowerKey(int entityType,int entityId){
        return Follower+SPLIT+entityType+SPLIT+entityId;
    }

    public static String getKaptchaKey(String owner){
        return KAPTCHA+SPLIT+owner;
    }

    public static String getTicketKey(String ticket){
        return TICKET+SPLIT+ticket;
    }

    public static String getUserKey(int userId){
        return USER+SPLIT+userId;
    }


}
